<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="css/amazeui.min.css">
		<link rel="stylesheet" href="css/admin.css">
		<style>
			.admin-main{
				padding-top: 0px;
			}
		</style>
	</head>
	<body>
		<div class="am-cf admin-main">
			<div class="admin-content">
				<div class="admin-content-body">
					<div class="am-g">
						<form onsubmit="return submit_sure()" action="updatePwd.do" class="am-form am-form-horizontal" method="post"  style="padding-top:30px;" data-am-validator >
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									新密码 </label>
								<div class="am-u-sm-9">
									<input type="password" id="doc-vld-pwd-1" required placeholder="请输入新密码" id="password" name="password"> <small>输入新密码。</small>
								</div>
							</div>
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									重复密码</label>
								<div class="am-u-sm-9">
									<input type="password" id="doc-vld-pwd-2" required placeholder="请输入重复密码" id="rpassword" name="rpassword" data-equal-to="#doc-vld-pwd-1"
									 required> <small>输入重复密码。</small>
								</div>
							</div>
							<div class="am-form-group">
								<div class="am-u-sm-9 am-u-sm-push-3">
									<input type="submit" id="btns"  class="am-btn am-btn-success" value="修改密码" />
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript" src="js/jquery-1.11.3.min.js">
		</script>
		<script type="text/javascript" src="myplugs/js/plugs.js">
		</script>
		<script>
			function submit_sure(){
					//	获取dom值
					var password = $("#doc-vld-pwd-1").val()
					var rpassword = $("#doc-vld-pwd-2").val()
				//1.如果两次密码不一致
				if(password!=rpassword){
					alert("两次密码不一致")
					return false;
				}
				//2.如果密码的长度小于6位
				if(password.length<6 || rpassword.length <6){
					alert("密码的长度小于6位")
					return false;
				}
				//2.如果密码的长度为空
				if(password.length == 0 || rpassword.length == 0){
					alert("密码不能为空")
					return false;
				}
				parent.document.getElementsByClassName("jq_dvpanel")[0].style.display = "none";
				alert("修改成功")
				return true;
			}
		</script>
	</body>
</html>
